//
//  GRXHeaderCollectionViewCell.m
//  1-MushroomStreet-自定义tabbar
//
//  Created by xmg on 15/12/22.
//  Copyright © 2015年 grx. All rights reserved.
//

#import "GRXHeaderCollectionViewCell.h"
#import "GRXMarketsItem.h"
#import "GRXCategoryItem.h"
#import <UIImageView+WebCache.h>
@interface GRXHeaderCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;

@end

@implementation GRXHeaderCollectionViewCell

- (void)awakeFromNib{

}

- (void)setMarketItem:(GRXMarketsItem *)marketItem{
    _marketItem = marketItem;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:marketItem.img]];
    self.titleLabel.text = marketItem.title;
    self.descLabel.text = marketItem.desc;
    
//    NSLog(@"%@",marketItem.title);
}


- (void)setCategoryItem:(GRXCategoryItem *)categoryItem{
    _categoryItem = categoryItem;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:categoryItem.img]];
    self.titleLabel.text = categoryItem.title;
    self.descLabel.text = categoryItem.desc;
}

@end
